package com.zcf.controller;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zcf.common.json.Body;
import com.zcf.pojo.Astrict;

import org.springframework.stereotype.Controller;

/**
 * <p>
 * 提现限制表 前端控制器
 * </p>
 *
 * @author loupeng
 * @since 2019-03-05
 */
@Controller
@RequestMapping("/astrict")
@CrossOrigin
@ResponseBody
public class AstrictController {

	/**
	 * 修改提现额度
	 * 
	 * @param astrict
	 * @return
	 */
	@PostMapping("update")
	public Body update(Astrict astrict) {
		astrict.setAstrictId("2019EW02284W1416n550");
		Boolean falg = astrict.updateById();
		if (falg) {
			return Body.BODY_200;
		}
		return Body.BODY_500;
	}

	@PostMapping("queryAll")
	public Body queryAll() {
		Astrict astrict = new Astrict();
		astrict.setAstrictId("2019EW02284W1416n550");
		astrict = astrict.selectById();
		if (astrict != null) {
			return Body.newInstance(astrict);
		}
		return Body.BODY_500;
	}

}
